import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import moment from 'moment'

Vue.use(ElementUI)

Vue.filter('moment',function(value){
  return moment(value).format("YYYY-MM-DD")
})

Vue.config.productionTip = false
axios.defaults.baseURL = "http://localhost:3000"
Vue.prototype.$axios = axios
Vue.filter('moment',function(value,formatString){
  formatString = formatString || 'YYYY-MM-DD';
  return moment(value).format("YYYY-MM-DD")
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
